package xs.com.location.utils;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

/**
 * Created by Administrator on 2015/9/7.
 */
public class AppTool {
    /**
     * 页面跳转
     *
     * @param context
     * @param cls
     */
    public static void activiyJump(Context context, Class<?> cls, Bundle extras) {
        Intent intent = new Intent(context, cls);
        if (extras != null)
            intent.putExtras(extras);
        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        context.startActivity(intent);
    }

    /**
     * 页面跳转
     *
     * @param context
     * @param cls
     */
    public static void activiyJump(Context context, Class<?> cls) {
        activiyJump(context, cls, null);
    }
}
